package com.lanhai.zhonglai.beans;
 
import com.lanhai.zhonglai.enums.AgvCurrentTransEnum; 
import com.lanhai.zhonglai.enums.TransDirectionEnum;

/**
 * 小车数据定义
 *
 * @author zhengwei
 *
 */
public class AgvBean  {

	// 基础数据部分
	private int agvId;
	private int port;
	private String ip;

	//******** 运动相关
	private long areaId;
	private int currentX;
	private int currentY;
	private int dotno; //所在点位（到达点位才有值）
	private int power;

	private String nextProcess;// 下一道工序分组
	private String nexttStationName; //下一个目的地（名称，比如制绒上料L1）
	private int nextRoad; //下一条路线（退出机台时使用）
	private int nextStationID; //下一个机台的点位


	//********** 指令相关
	private String lastCmd; //最后发送的指令
	private int cmdtime=0;  //最后指令发送次数
	private String currentDo; //正在处理事件的名称


	//**********传输相关
	private AgvCurrentTransEnum currentTrans; //当前需要传输的状态
	private boolean finishTrans;  //传输完成标识，是给二维码做判断的
	 private int specialline;  //当前线别
	 private boolean upHasTrans; //上层传输标识
	 private boolean downHasTrans;  //下层传输标识 
	 private boolean bothTrans ;   //上下层传输的标识
	 private TransDirectionEnum applyTransType;  // 申请传输的类型,注意，这是机台的角度，不是AGV的角度
	 private boolean transing; //传输中的标识 
	  
 
	 //******** 保存相关 
	 private int lastSaveDot;
	 private boolean toHC;  //去缓存机
	 private boolean fromHC;  //来自缓存机
	 
	 //***********多次传
	 private boolean fakeLeave;  //假离开的标识
	  private boolean notClear ;  //传输完成后是否需要在传入完成事件中不调用StationCmdMap.stopTrans


	public AgvBean copy() {
		AgvBean obj=new AgvBean();
		obj.setCmdtime(cmdtime);
		obj.setLastCmd(lastCmd); 
		obj.setNexttStationName(nexttStationName);
		obj.setSpecialline(specialline);
		obj.setFinishTrans(finishTrans);
		obj.setNextRoad(nextRoad);
		obj.setCurrentTrans(currentTrans);
		obj.setCurrentX(currentX);
		obj.setCurrentY(currentY);
		obj.setAgvId(agvId);
		obj.setPort(port);
		obj.setIp(ip);
		obj.setAreaId(areaId);
		obj.setNextProcess(nextProcess);
		obj.setUpHasTrans(upHasTrans);
		obj.setDownHasTrans(downHasTrans);
		obj.setCurrentDo(currentDo);
		obj.setDotno(dotno); 
		obj.setPower(power);
		obj.setBothTrans(bothTrans); 
		obj.setLastSaveDot(lastSaveDot); 
		obj.setApplyTransType(applyTransType); 
		obj.setFakeLeave(fakeLeave);  
		obj.setTransing(transing);
		obj.setNotClear(notClear);
		obj.setToHC(toHC);
		obj.setFromHC(fromHC);
		obj.setNextStationID(nextStationID);
		return obj;
	}

 

	public int getNextStationID() {
		return nextStationID;
	}



	public void setNextStationID(int nextStationID) {
		this.nextStationID = nextStationID;
	}



	public boolean isFakeLeave() {
		return fakeLeave;
	}



	public void setFakeLeave(boolean fakeLeave) {
		this.fakeLeave = fakeLeave;
	}



	public String getCurrentDo() {
		return currentDo;
	}


	public void setCurrentDo(String currentDo) {
		this.currentDo = currentDo;
	}




	public boolean isFromHC() {
		return fromHC;
	}



	public void setFromHC(boolean fromHC) {
		this.fromHC = fromHC;
	}



	public TransDirectionEnum getApplyTransType() {
		return applyTransType;
	}


	public void setApplyTransType(TransDirectionEnum applyTransType) {
		this.applyTransType = applyTransType;
	}


	public boolean isTransing() {
		return transing;
	}


	public void setTransing(boolean transing) {
		this.transing = transing;
	}

 

	public int getPower() {
		return power;
	}


	public void setPower(int power) {
		this.power = power;
	}


	public int getDotno() {
		return dotno;
	}


	public void setDotno(int dotno) {
		this.dotno = dotno;
	}


 

	public void addTime() {
		cmdtime++;
	}


	public boolean isUpHasTrans() {
		return upHasTrans;
	}


	public void setUpHasTrans(boolean upHasTrans) {
		this.upHasTrans = upHasTrans;
	}


	public boolean isDownHasTrans() {
		return downHasTrans;
	}


	public void setDownHasTrans(boolean downHasTrans) {
		this.downHasTrans = downHasTrans;
	}



	public int getNextRoad() {
		return nextRoad;
	}

	public void setNextRoad(int nextRoad) {
		this.nextRoad = nextRoad;
	}

	public String getLastCmd() {
		return lastCmd;
	}

	public void setLastCmd(String lastCmd) {
		this.lastCmd = lastCmd;
	}




	public int getCmdtime() {
		return cmdtime;
	}

	public void setCmdtime(int cmdtime) {
		this.cmdtime = cmdtime;
	}

	public int getAgvId() {
		return agvId;
	}

	public void setAgvId(int agvId) {
		this.agvId = agvId;
	}

	public long getAreaId() {
		return areaId;
	}

	public void setAreaId(long areaId) {
		this.areaId = areaId;
	}



	public String getNextProcess() {
		return nextProcess;
	}

	public void setNextProcess(String nextProcess) {
		this.nextProcess = nextProcess;
	}

	public int getCurrentX() {
		return currentX;
	}

	public void setCurrentX(int currentX) {
		this.currentX = currentX;
	}

	public int getCurrentY() {
		return currentY;
	}

	public void setCurrentY(int currentY) {
		this.currentY = currentY;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public int getSpecialline() {
		return specialline;
	}

	public void setSpecialline(int specialline) {
		this.specialline = specialline;
	}

	public AgvCurrentTransEnum getCurrentTrans() {
		return currentTrans;
	}

	public void setCurrentTrans(AgvCurrentTransEnum currentTrans) {
		this.currentTrans = currentTrans;
	}



	public String getNexttStationName() {
		return nexttStationName;
	}


	public void setNexttStationName(String nexttStationName) {
		this.nexttStationName = nexttStationName;
	}


	public boolean isFinishTrans() {
		return finishTrans;
	}

	public void setFinishTrans(boolean finishTrans) {
		this.finishTrans = finishTrans;
	}
 
	public boolean isBothTrans() {
		return bothTrans;
	}


	public void setBothTrans(boolean bothTrans) {
		this.bothTrans = bothTrans;
	}


	 

	public int getLastSaveDot() {
		return lastSaveDot;
	}


	public void setLastSaveDot(int lastSaveDot) {
		this.lastSaveDot = lastSaveDot;
	}



	public boolean isNotClear() {
		return notClear;
	}



	public void setNotClear(boolean notClear) {
		this.notClear = notClear;
	}



	public boolean isToHC() {
		return toHC;
	}



	public void setToHC(boolean toHC) {
		this.toHC = toHC;
	}


 
	

}
